/**
 * 用户
 */

var Sequelize = require('sequelize');
var {sequelize} = require('../sequelize.js');

var user = sequelize.define('user',{
    id: {
        type: Sequelize.BIGINT(20),
        primaryKey: true,
        allowNull: false,
        unique: true,
        autoIncrement: true
    },
    account: Sequelize.STRING(255), // 账号
    userName:Sequelize.STRING(255), // 昵称
    passWord:Sequelize.STRING(255), // 密码
    ip:Sequelize.STRING(255),
    isBanned:Sequelize.BIGINT,
    create_time: Sequelize.DATE,
   
},{
    timestamps: false, // 不要默认时间戳 数据库没有时间戳字段时，设置为false，否则报错  SequelizeDatabaseError: Unknown column 'createdAt' in 'field list'
    freezeTableName: true 
});

module.exports = user;
